﻿if exists (select * from sysobjects where name like N'%sp_DMDonViTinh_Insert%')
	drop proc sp_DMDonViTinh_Insert
go
create proc sp_DMDonViTinh_Insert
	@MaDonViTinh int = null,	
	@TenDonViTinh nvarchar(50) = null,
	@IsUse bit = null,
	@CreateBy int = null,
	@ModifiedBy int = null,
	@ModifiedOn datetime = null
as
begin
	if not exists (select * from DMDonViTinh where MaDonViTinh = @MaDonViTinh)
	begin	
		insert into DMDonViTinh (TenDonViTinh, IsUse, CreateBy)
			values (@TenDonViTinh, @IsUse, @CreateBy)
	end
end